<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        function findByItem(pg){
            $("pageNO").value = pg;
            $("f1").submit();
        }

        function $(id){
            return document.getElementById(id);
        }
    </script>
</head>
<body>

    <table border="1" width="60%">
        <thead><tr><th>编号</th><th>姓名</th><th>生日</th><th>电话</th><th>操作</th></tr></thead>
        <tbody>
            <tr th:each="stu : ${ipage.records}">
                <td th:text="${stu.id}"></td>
                <td th:text="${stu.name}"></td>
                <td th:text="${stu.birthday}"></td>
                <td th:text="${stu.phone}"></td>
                <td><a th:href="@{/student/findById(id=${stu.id})}">修改</a></td>
            </tr>
        </tbody>
    </table>

    <div>
        <a style="margin-left: 10px" th:each="i : ${#numbers.sequence(1,ipage.pages)}"
           th:text="${i}" th:href="'javascript:findByItem('+${i}+')'"></a>
    </div>

    <form id="f1" action="/student/findByItem">
        <input type="hidden" name="pageNO" id="pageNO"><br>
        姓名：<input type="text" name="name" th:value="${name}"><br>
        起始日期：<input type="text" name="startDate" th:value="${startDate}"><br>
        结束日期：<input type="text" name="endDate" th:value="${endDate}"><br>
        <input type="submit" value="提交">
    </form>
</body>
</html>